// 公共接口 比如数据字典
import http from '@/utils/http/axios'
import { RequestEnum } from '@/enums/httpEnum'

// 获取新闻资讯列表
export function getNoticeList(params) {
  return http.request(
    {
      url: `/ds/notice/list`,
      method: RequestEnum.POST,
      params
    }
  )
}
// 获取新闻资讯详情
export function getNoticeDetail(params) {
  return http.request(
    {
      url: `/ds/notice/detail`,
      method: RequestEnum.POST,
      params
    }
  )
}
// 显示已读未读数量
export function getNoticeNum(params) {
  return http.request(
    {
      url: `/ds/notice/num`,
      method: RequestEnum.POST,
      params
    }
  )
}
// 设置全部标为已读
export function setMsgAll() {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
    }
  )
}


// 统一提交接口
export function setData(params) {
  return http.request(
    {
      url: `/ds/common/submit`,
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '操作成功'
    }
  )
}


// 上传图片
export function uploadUserImage(params) {
  return http.uploadFiles(
    {
      url: '/ds/common/submit',
      method: RequestEnum.POST,
      params
    },
    {
      successMessageText: '上传用户头像成功',
    },
  )
}
